package com.example.forum.services;

import com.example.forum.model.Message;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IMessageService {
    void create(Message message);

    Integer selectUnreadCount(Long receiveUserId);  //查看未读信息数

    //根据接收者的ID查寻所有站内信
    List<Message> selectByReceiveUserId (Long receiveUserId);

    Message selectById(Long id);

    //更新帖子是否已读
    void updateStateById(Long id,Byte state);

    //回复站内信
    @Transactional
    void reply(Long repliedId,Message message);
}
